﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BusinessGroupForm.aspx.cs" Inherits="FBKPI.Forms.BusinessGroupForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btn_save").click(function () {
                var param = "?";
                var isActive = 'false';

                $('#form1 td input:checked').each(function () {
                    var $cb = $(this);
                    if ($cb.attr('id') == 'chk_active') {
                        isActive = 'true';
                    }
                });

                param = param + "action=save";
                param = param + "&ID=" + $("#txt_id").val();
                param = param + "&Description=" + $("#txt_description").val();
                param = param + "&isActive=" + isActive;
                param = param + "&CurrUser=" + $("#txt_user").val();
                ProcessRequest("BusinessGroupHandler.ashx" + param, "#divdetail", "#BusinessGroupTable");
                return false;
            });


            $("#btn_delete").click(function () {
                if (confirm('Are you sure to delete this record?')) {
                    var param = "?";
                    param = param + "action=delete";
                    param = param + "&ID=" + $("#txt_id").val();
                    param = param + "&CurrUser=" + $("#txt_user").val();
                    ProcessRequest("BusinessGroupHandler.ashx" + param, "#divdetail", "#BusinessGroupTable");
                    return false;
                }
                return false;
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div id="businessgroupformarea" class="ui-widget-content padding5px ui-corner-all">
            <table class="dialogTable">
                <tr>
                    <td width="140px">ID</td>
                    <td class="Separator">:</td>
                    <td><asp:TextBox ID="txt_id" runat="server" ReadOnly="true"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Description</td>
                    <td>:</td>
                    <td><asp:TextBox ID="txt_description" runat="server" class="longText mandatory"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>is Active</td>
                    <td>:</td>
                    <td><asp:CheckBox ID="chk_active" runat="server"/></td>
                </tr>
            </table>
        </div>
        <br />
        <div id="AuditInformation" class="ui-widget-content padding5px ui-corner-all">
            <b style="margin-left:5px">Audit Information</b>
            <table class="dialogTable">
                <tr>
                    <td width="140px">Last Modified Date</td>
                    <td class="Separator">:</td>
                    <td><asp:TextBox ID="txt_lastmodifieddate" runat="server" ReadOnly="true"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Last Modified By</td>
                    <td>:</td>
                    <td><asp:TextBox ID="txt_lastmodifiedby" runat="server" ReadOnly="true"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Create Date</td>
                    <td>:</td>
                    <td><asp:TextBox ID="txt_createdate" runat="server" ReadOnly="true"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Create By</td>
                    <td>:</td>
                    <td><asp:TextBox ID="txt_createby" runat="server" ReadOnly="true"></asp:TextBox></td>
                </tr>
            </table>
        </div>
        <br />
        <button id="btn_save" class="ui-button ui-corner-all ui-button ui-state-default ui-button-text-icon-primary" runat="server" name="btnSave">
            <span class="ui-button-icon-primary ui-icon ui-icon-check"></span>
            <label class="ui-button-text">
                Save</label>
        </button>

        <button id="btn_delete" class="ui-button ui-corner-all ui-button ui-state-default ui-button-text-icon-primary" runat="server">
            <span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span>
            <label class="ui-button-text">
                Delete</label>
        </button>
    </form>
</body>
</html>
